package LeetCode.interview;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import LeetCode.interview._104_Maximum_Depth_of_Binary_Tree.TreeNode;
import sun.tools.jar.resources.jar;
import util.LogUtils;
import util.datastructure.ListNode;

/*
 * 
原题　
		 Reverse a linked list from position m to n. Do it in-place and in one-pass.
	
	For example:
	Given 1->2->3->4->5->NULL, m = 2 and n = 4,
	
	return 1->4->3->2->5->NULL.
	
	Note:
	Given m, n satisfy the following condition:
	1 ≤ m ≤ n ≤ length of list. 
题目大意

解题思路
	TODO:
 * @Date 2017-09-14 23：43
 */
public class _092_Reverse_Linked_List_II {
    public ListNode reverseBetween(ListNode head, int m, int n) {
    	return null;
    }
    private ListNode find(ListNode head, int m) {
    	int count = 0;
    	while (head!=null && count<m-1) {
    		count ++;
    		head = head.next;
    	}
    	LogUtils.println("092////", head.val);
    	return head;
    }
	public static void main(String[] args) {
		_092_Reverse_Linked_List_II obj = new _092_Reverse_Linked_List_II();
		obj.reverseBetween(ListNode.newLinkListOrdered(), 3, 5);
	}

}
